<template>
  <div class="expected">
    <div class="expected-head">
      <div class="title">合计</div>
      <div class="desc"><span class="num">16</span>人月</div>
    </div>
    <div class="expected-list">
      <div
        class="expected-item"
        v-for="(item,index) in [1, 2, 3, 4, 5, 5, 6, 7]"
        :key="index"
      >
        <div class="title">功能描述1</div>
        <div class="desc">
          20人天<span class="font_family icon-gengduo form-arrow"></span>
        </div>
      </div>
    </div>
    <div class="ol-add" @click="handleAdd">
      <span class="font_family icon-xinjian_list"></span>
    </div>
  </div>
</template>
<script>
import { estimateWork } from "@/api/service.js";
export default {
  data() {
    return {
      dataList:''
    };
  },
  mounted() {
    this.getData(
      this.$route.query.server_id,
      this.$route.query.implement_comment_id,
      this.$route.query.system_id,
      this.$route.query.function_name
    );
  },
  methods: {
    handleAdd() {
      this.$router.push("/service/features");
    },
    getData(server_id,implement_comment_id, system_id, function_name) {
      estimateWork({
        server_id: server_id,
        implement_content_id: implement_comment_id,
        system_id: system_id,
        function_name: function_name,
      }).then((res) => {
        console.log(res);
        if(res.status == 'success'){
          this.dataList = res.data
        }
      });
    },
  },
};
</script>
<style lang="less" scoped>
.expected {
  background: #f7f9f9;
  min-height: 100vh;
  .expected-head {
    display: flex;
    height: 90px;
    background: #009966;
    padding: 0 15px;
    color: #fff;
    align-items: center;
    justify-content: space-between;
    .title {
      font-size: 16px;
    }
    .desc {
      font-size: 15px;
    }
    .num {
      display: inline-block;
      margin-right: 5px;
      font-size: 47px;
    }
  }
  .expected-list {
    padding-top: 10px;
    .expected-item {
      display: flex;
      background: #fff;
      padding: 0 15px;
      height: 50px;
      line-height: 50px;
      margin-bottom: 10px;
      .title {
        flex: 1;
        font-size: 16px;
        color: #011445;
        font-weight: bold;
      }
      .desc {
        font-size: 14px;
        color: #011445;
        span {
        }
      }
    }
  }
}
// ol-add
.ol-add {
  position: fixed;
  right: 21px;
  bottom: calc(81px + env(safe-area-inset-bottom));
  text-align: center;
  line-height: 46px;
  color: #fff;
  width: 46px;
  height: 46px;
  background: #009966;
  border-radius: 50%;
  box-shadow: 0px 3px 12px 1px rgba(0, 153, 102, 0.6);
  span {
    font-size: 36px;
  }
}
</style>